package feesmodule.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;


@Entity
@Table(name="JURISDICTION")
public class Jurisdiction implements Serializable
{
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name="JURISDICTION_ID")
    private int id;
    @Column(name="JURISDICTION_NAME")
    private String name;
    @ManyToOne
    @JoinColumn(name="AREA_ID")
    private Area owner;
    
    @OneToMany(mappedBy="jurisdiction")
    private List<JurisdictionServices> serviceMapping = new ArrayList<JurisdictionServices>();

    /**
     * @return the name
     */
  
    public String getName() {
        return name;
    }

    /**
     * @return the id
     */
   
    public int getId() {
        return id;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the owner
     */
    public Area getOwner() {
        return owner;
    }

    /**
     * @param owner the owner to set
     */
    public void setOwner(Area owner) {
        this.owner = owner;
    }

    /**
     * @return the serviceMapping
     */
    public List<JurisdictionServices> getServiceMapping() {
        return serviceMapping;
    }

    /**
     * @param serviceMapping the serviceMapping to set
     */
    public void setServiceMapping(List<JurisdictionServices> serviceMapping) {
        this.serviceMapping = serviceMapping;
    }

  
}
